{% extends "layout.html.twig" %}
{% form_theme form 'AcmeEventBundle:Form:fields.html.twig' %}
{% block content %}
	
			<h2>Events erfassen</h2>
			
			<table class="table events">
				<thead>
					<tr>
						<td><strong>Datum</strong></td>
						<td><strong>Organisator</strong></td>
	        			<td><strong>Bearbeiten</strong></td>
	        			<td><strong>Löschen</strong></td>
	        			<td><strong>Gesendet</strong></td>
					</tr>
				</thead>
				<tbody>
				{% for information in informations %}
					<tr>
	        			<td>{{ information.datum|date('d-m-Y') }}</td>
	        			<td>{{ information.lastname }}</td>
	        			<td>{% if information.is_send == false %}<a href="{{ path('edit_events', { 'id':	 information.id }) }}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a>{% endif %}</td>
	        			<td>{% if information.is_send == false %}<a href="{{ path('remove_events', { 'id': information.id }) }}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></a>{% endif %}</td>
	        			<td>{% if information.is_send == true %}{{ information.datum_send_execute|date('d.m.Y H:m:s') }}{% endif %}</td>
        			</tr>
    			{% endfor %}
    			</tbody>
			</table>
			
			{{ form_start(form) }}
			    {{ form_errors(form) }}
			
				<div class="row">
					<div class="col-md-6">
						{{ form_widget(form.datum, {
						    	'information': information
							}) 
						}}
					</div>				
					<div class="col-md-6">
					    <div class="form-group">
					        {{ form_label(form.user) }}
					        {{ form_errors(form.user) }}
					        {{ form_widget(form.user) }}
					    </div>
				    </div>
				</div>
<!--
				<div class="row">
					<div class="col-md-12">
					    <div class="form-group">
					        {{ form_label(form.street) }}
					        {{ form_errors(form.street) }}
					        {{ form_widget(form.street) }}
						</div>
					</div>
				</div>

				<div class="row">
					<div class="col-md-6">
					    <div class="form-group">
					        {{ form_label(form.postcode) }}
					        {{ form_errors(form.postcode) }}
					        {{ form_widget(form.postcode) }}
						</div>
					</div>
					<div class="col-md-6">
					    <div class="form-group">
					        {{ form_label(form.city) }}
					        {{ form_errors(form.city) }}
					        {{ form_widget(form.city) }}
						</div>
					</div>
				</div>
				
				<div class="row">
					<div class="col-md-6">
					    <div class="form-group">
					        {{ form_label(form.email) }}
					        {{ form_errors(form.email) }}
					        {{ form_widget(form.email) }}
						</div>
					</div>
					<div class="col-md-6">
					    <div class="form-group">
					        {{ form_label(form.telefon) }}
					        {{ form_errors(form.telefon) }}
					        {{ form_widget(form.telefon) }}
						</div>
					</div>
				</div>

				<div class="row">
					<div class="col-md-12">
					    <div class="form-group">
					        {{ form_label(form.description) }}
					        {{ form_errors(form.description) }}
					        {{ form_widget(form.description) }}
						</div>
					</div>
				</div>		
-->
			    <div class="row">
			    	<div class="col-md-12">
			    		<div class="form-group">
			        		{{ form_widget(form.save, { attr: {'class':'btn btn-default'}} ) }}
			        	</div>
			        </div>
			    </div>
			
			{{ form_end(form) }}
			
			
{% endblock %}			